@mixin clearfix {
    &:after {
        content: "";
        display: table;
        clear: both;
    }
}

@mixin relative {
    position: relative;
    width: 100%;
    height: 100%;
}

@mixin clearfix {
    &:after {
        content: "";
        display: table;
        clear: both;
    }
}

@mixin scrollBar {
    &::-webkit-scrollbar-track-piece {
        // background: #d3dce6;
        background: #fff;
    }
    &::-webkit-scrollbar {
        width: 6px;
        height: 6px;
    }
    &::-webkit-scrollbar-thumb {
        background: #99a9bf;
        border-radius: 20px;
    }
}

@mixin pct($pct) {
    width: #{$pct};
    position: relative;
    margin: 0 auto;
}

@mixin triangle($width, $height, $color, $direction) {
    $width: $width/2;
    $color-border-style: $height solid $color;
    $transparent-border-style: $width solid transparent;
    height: 0;
    width: 0;
    @if $direction==up {
        border-bottom: $color-border-style;
        border-left: $transparent-border-style;
        border-right: $transparent-border-style;
    }
    @else if $direction==right {
        border-left: $color-border-style;
        border-top: $transparent-border-style;
        border-bottom: $transparent-border-style;
    }
    @else if $direction==down {
        border-top: $color-border-style;
        border-left: $transparent-border-style;
        border-right: $transparent-border-style;
    }
    @else if $direction==left {
        border-right: $color-border-style;
        border-top: $transparent-border-style;
        border-bottom: $transparent-border-style;
    }
}

@mixin fontLabel {
    font-size: 12px;
    // font-size: 14px;
    color: #606266;
    font-weight: 700;
    line-height: 36px;
    white-space: nowrap;
}

@mixin fontValue {
    font-size: 12px;
    // font-size: 14px;
    color: #606266;
    font-weight: 500;
    white-space: nowrap;
}

@mixin tabCellOver {
    white-space: nowrap;
    overflow: hidden;
}

@mixin wBorderTable($num, $leftW, $rightW) {
    display: flex;
    flex-wrap: wrap;
    font-size: 10px;
    // font-size: 12px;
    border: 1px solid #D8DCE4;
    li {
        line-height: 25px;
        padding: 8px;
        word-break: break-all!important;
        border-bottom: 1px solid #D8DCE4;
        border-right: 1px solid #D8DCE4;
    }
    @for $i from 0 to ($num) {
        @if $i % 2==0 {
            li:nth-child(#{$num}n - #{$i}) {
                flex: 0 0 $rightW;
                text-align: left;
            }
        }
        @else {
            li:nth-child(#{$num}n - #{$i}) {
                flex: 0 0 $leftW;
                text-align: right;
            }
        }
        li:nth-child(#{$num}n) {
            border-right: none;
        }
    }
    .must::before {
        content: "*";
        line-height: 26px;
        color: #f00;
        font-weight: 800;
        font-size: 12px;
        // font-size: 14px;
        position: relative;
        top: 3px;
        margin-right: 5px;
    }
}

@mixin wLabelBorderTable($num, $liW, $labelW:40%) {
    display: flex;
    flex-wrap: wrap;
    font-size: 10px;
    // font-size: 12px;
    border: 1px solid #D8DCE4;
    >li {
        width: $liW;
        display: flex;
        flex-wrap: wrap;
        line-height: 25px;
        word-break: break-all!important;
        border-bottom: 1px solid #D8DCE4;
        border-right: 1px solid #D8DCE4;
        >label {
            flex-wrap: wrap;
            display: block;
            padding: 0 10px;
            font-weight: 400;
            text-align: right;
            flex: 0 0 $labelW;
            border-right: 1px solid #D8DCE4;
            padding: 8px;
        }
        >div {
            flex-wrap: wrap;
            flex: 1 0 100 - $labelW;
            padding: 8px;
        }
    }
    >li:nth-child(#{$num}n) {
        border-right: none;
    }
    >li.must {
        >label::before {
            content: "*";
            line-height: 26px;
            color: #f00;
            font-weight: 800;
            font-size: 12px;
            // font-size: 14px;
            position: relative;
            top: 3px;
            margin-right: 5px;
        }
    }
}

@mixin wLabelTable($num, $liW, $labelW:40%) {
    display: flex;
    flex-wrap: wrap;
    font-size: 12px;
    // font-size: 14px;
    padding: 0;
    margin: 0;
    >li {
        width: $liW;
        display: flex;
        flex-wrap: wrap;
        line-height: 24px;
        word-break: break-all!important;
        >label {
            flex-wrap: wrap;
            display: block;
            padding: 6px;
            font-weight: 800;
            text-align: right;
            flex: 0 0 $labelW;
            color: #606266;
        }
        >div {
            flex-wrap: wrap;
            // flex: 1 0 auto;
            padding: 6px;
            flex: 1 0 100 - $labelW;
        }
    }
    >li:nth-child(#{$num}n) {
        border-right: none;
    }
    >li.must {
        >label::before {
            content: "*";
            line-height: 26px;
            color: #f00;
            font-weight: 800;
            font-size: 12px;
            // font-size: 14px;
            position: relative;
            top: 3px;
            margin-right: 5px;
        }
    }
}